﻿Imports System.Xml.Linq

Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports Project_3



'''<summary>
'''This is a test class for BaseRequestTest and is intended
'''to contain all BaseRequestTest Unit Tests
'''</summary>
<TestClass()> _
Public Class BaseRequestTest


	Private testContextInstance As TestContext

	'''<summary>
	'''Gets or sets the test context which provides
	'''information about and functionality for the current test run.
	'''</summary>
	Public Property TestContext() As TestContext
		Get
			Return testContextInstance
		End Get
		Set(value As TestContext)
			testContextInstance = Value
		End Set
	End Property

#Region "Additional test attributes"
	'
	'You can use the following additional attributes as you write your tests:
	'
	'Use ClassInitialize to run code before running the first test in the class
	'<ClassInitialize()>  _
	'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
	'End Sub
	'
	'Use ClassCleanup to run code after all tests in a class have run
	'<ClassCleanup()>  _
	'Public Shared Sub MyClassCleanup()
	'End Sub
	'
	'Use TestInitialize to run code before running each test
	'<TestInitialize()>  _
	'Public Sub MyTestInitialize()
	'End Sub
	'
	'Use TestCleanup to run code after each test has run
	'<TestCleanup()>  _
	'Public Sub MyTestCleanup()
	'End Sub
	'
#End Region


	'''<summary>
	'''A test for sendPOSTResponse
	'''</summary>
	<TestMethod()> _
	Public Sub sendPOSTResponseTest()
		Dim target As BaseRequest = New BaseRequest() ' TODO: Initialize to an appropriate value

		target.InitializeMembers("album.getInfo")

		target.AddMember("artist", "Disturbed", True)
		target.AddMember("album", "Believe", True)
		target.AddMember("username", "ZenithWest", False)
		target.AddMember("api_key", "54196e49dcb3244cdee3baef611c5e98", False)

		Dim xmlresponse As XDocument = target.sendPOSTResponse()


		Dim AuthRequired As Boolean = False	' TODO: Initialize to an appropriate value
		Dim expected As String = "ok"	 ' TODO: Initialize to an appropriate value
		Dim actual As String = xmlresponse.<lfm>.Attributes.First.Value

		Assert.AreEqual(expected, actual)
		'Assert.Inconclusive("Verify the correctness of this test method.")
	End Sub
End Class
